package fanxinlianxi;

import java.util.LinkedList;

public class LinkList01 {
    public static void main(String[] args) {
        LinkedList<String>linkedList=new LinkedList<>();
        linkedList.add("111");
        linkedList.add("222");
        linkedList.add("333");
        linkedList.add("444");
        System.out.println(linkedList);
        String remove = linkedList.remove(1);
        System.out.println(remove);
        System.out.println(linkedList);
        String first = linkedList.getFirst();
        System.out.println(first);
        String last = linkedList.getLast();
        System.out.println(last);
        System.out.println("________");
        for (int i = 0; i <linkedList.size() ; i++) {
            String s=linkedList.get(i);
            System.out.println(s);

        }
    }





}
